using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class BilCountBillDetail : BusinessBase<string>
    {
        #region Declarations

        private string _countBillCode = String.Empty;
        private string _stockCode = String.Empty;
        private string _iBCode = String.Empty;
        private string _iBDate = String.Empty;
        private string _goodsCode = String.Empty;
        private string _goodsBarCode = String.Empty;
        private string _singleGoodsCode = String.Empty;
        private string _warehouseCode = String.Empty;
        private string _warehouseName = String.Empty;
        private string _areaCode = String.Empty;
        private string _areaName = String.Empty;
        private string _shelfCode = String.Empty;
        private string _shelfName = String.Empty;
        private string _locationCode = String.Empty;
        private string _locationName = String.Empty;
        private string _storageUnitCode = String.Empty;
        private string _storageUnitName = String.Empty;
        private string _goodsName = String.Empty;
        private int _spec = default(Int32);
        private int _pkgQty = default(Int32);
        private int _countedPkgQty = default(Int32);
        private int _pieceQty = default(Int32);
        private int _countedPieceQty = default(Int32);
        private int _goodsQty = default(Int32);
        private int _countedGoodsQty = default(Int32);
        private string _remark = String.Empty;
        private string _editFlag = String.Empty;



        #endregion

        #region Constructors

        public BilCountBillDetail() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_countBillCode);
            sb.Append(_stockCode);
            sb.Append(_iBCode);
            sb.Append(_goodsCode);
            sb.Append(_warehouseCode);
            sb.Append(_warehouseName);
            sb.Append(_areaCode);
            sb.Append(_areaName);
            sb.Append(_locationCode);
            sb.Append(_locationName);
            sb.Append(_storageUnitCode);
            sb.Append(_storageUnitName);
            sb.Append(_goodsName);
            sb.Append(_goodsQty);
            sb.Append(_countedGoodsQty);
            sb.Append(_remark);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        //[DataMember]
        //public override string Id
        //{
        //    get
        //    {
        //        System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
        //        uniqueId.Append(_countBillCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_stockCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_iBCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_goodsCode.ToString());
        //        return uniqueId.ToString();
        //    }
        //}

        [DataMember]
        public virtual string CountBillCode
        {
            get { return _countBillCode.TrimEnd(); }
            set
            {
                OnCountBillCodeChanging();
                _countBillCode = value;
                OnCountBillCodeChanged();
            }
        }
        partial void OnCountBillCodeChanging();
        partial void OnCountBillCodeChanged();

        [DataMember]
        public virtual string StockCode
        {
            get { return _stockCode.TrimEnd(); }
            set
            {
                OnStockCodeChanging();
                _stockCode = value;
                OnStockCodeChanged();
            }
        }
        partial void OnStockCodeChanging();
        partial void OnStockCodeChanged();

        [DataMember]
        public virtual string IBCode
        {
            get { return _iBCode.TrimEnd(); }
            set
            {
                OnIBCodeChanging();
                _iBCode = value;
                OnIBCodeChanged();
            }
        }
        partial void OnIBCodeChanging();
        partial void OnIBCodeChanged();

        [DataMember]
        public virtual string IBDate
        {
            get { return _iBDate; }
            set { _iBDate = value; }
        }

        [DataMember]
        public virtual string GoodsCode
        {
            get { return _goodsCode.TrimEnd(); }
            set
            {
                OnGoodsCodeChanging();
                _goodsCode = value;
                OnGoodsCodeChanged();
            }
        }
        partial void OnGoodsCodeChanging();
        partial void OnGoodsCodeChanged();

        [DataMember]
        public virtual string GoodsBarCode
        {
            get { return _goodsBarCode.TrimEnd(); }
            set
            {
                _goodsBarCode = value;
            }
        }

        [DataMember]
        public virtual string SingleGoodsCode
        {
            get { return _singleGoodsCode.TrimEnd(); }
            set
            {
                _singleGoodsCode = value;
            }
        }

       
        [DataMember]
        public virtual string WarehouseCode
        {
            get { return _warehouseCode.TrimEnd(); }
            set
            {
                OnWarehouseCodeChanging();
                _warehouseCode = value;
                OnWarehouseCodeChanged();
            }
        }
        partial void OnWarehouseCodeChanging();
        partial void OnWarehouseCodeChanged();

        [DataMember]
        public virtual string WarehouseName
        {
            get { return _warehouseName.TrimEnd(); }
            set
            {
                OnWarehouseNameChanging();
                _warehouseName = value;
                OnWarehouseNameChanged();
            }
        }
        partial void OnWarehouseNameChanging();
        partial void OnWarehouseNameChanged();

        [DataMember]
        public virtual string AreaCode
        {
            get { return _areaCode.TrimEnd(); }
            set
            {
                OnAreaCodeChanging();
                _areaCode = value;
                OnAreaCodeChanged();
            }
        }
        partial void OnAreaCodeChanging();
        partial void OnAreaCodeChanged();

        [DataMember]
        public virtual string AreaName
        {
            get { return _areaName.TrimEnd(); }
            set
            {
                OnAreaNameChanging();
                _areaName = value;
                OnAreaNameChanged();
            }
        }
        partial void OnAreaNameChanging();
        partial void OnAreaNameChanged();

        [DataMember]
        public virtual string ShelfCode
        {
            get { return _shelfCode.TrimEnd(); }
            set { _shelfCode = value; }
        }

        [DataMember]
        public virtual string ShelfName
        {
            get { return _shelfName.TrimEnd(); }
            set { _shelfName = value; }
        }

        [DataMember]
        public virtual string LocationCode
        {
            get { return _locationCode.TrimEnd(); }
            set
            {
                OnLocationCodeChanging();
                _locationCode = value;
                OnLocationCodeChanged();
            }
        }
        partial void OnLocationCodeChanging();
        partial void OnLocationCodeChanged();

        [DataMember]
        public virtual string LocationName
        {
            get { return _locationName.TrimEnd(); }
            set
            {
                OnLocationNameChanging();
                _locationName = value;
                OnLocationNameChanged();
            }
        }
        partial void OnLocationNameChanging();
        partial void OnLocationNameChanged();

        [DataMember]
        public virtual string StorageUnitCode
        {
            get { return _storageUnitCode.TrimEnd(); }
            set
            {
                OnStorageUnitCodeChanging();
                _storageUnitCode = value;
                OnStorageUnitCodeChanged();
            }
        }
        partial void OnStorageUnitCodeChanging();
        partial void OnStorageUnitCodeChanged();

        [DataMember]
        public virtual string StorageUnitName
        {
            get { return _storageUnitName.TrimEnd(); }
            set
            {
                OnStorageUnitNameChanging();
                _storageUnitName = value;
                OnStorageUnitNameChanged();
            }
        }
        partial void OnStorageUnitNameChanging();
        partial void OnStorageUnitNameChanged();

        [DataMember]
        public virtual string GoodsName
        {
            get { return _goodsName.TrimEnd(); }
            set
            {
                OnGoodsNameChanging();
                _goodsName = value;
                OnGoodsNameChanged();
            }
        }
        partial void OnGoodsNameChanging();
        partial void OnGoodsNameChanged();

        [DataMember]
        public virtual int Spec
        {
            get { return _spec; }
            set { _spec = value; }
        }

        [DataMember]
        public virtual int PkgQty
        {
            get { return _pkgQty; }
            set { _pkgQty = value;}
        }

        [DataMember]
        public virtual int CountedPkgQty
        {
            get { return _countedPkgQty; }
            set { _countedPkgQty = value; }
        }

        [DataMember]
        public virtual int PieceQty
        {
            get { return _pieceQty; }
            set { _pieceQty = value; }
        }

        [DataMember]
        public virtual int CountedPieceQty
        {
            get { return _countedPieceQty; }
            set { _countedPieceQty = value; }
        }

        [DataMember]
        public virtual int GoodsQty
        {
            get { return _goodsQty; }
            set
            {
                OnGoodsQtyChanging();
                _goodsQty = value;
                OnGoodsQtyChanged();
            }
        }
        partial void OnGoodsQtyChanging();
        partial void OnGoodsQtyChanged();

        [DataMember]
        public virtual int CountedGoodsQty
        {
            get { return _countedGoodsQty; }
            set
            {
                OnCountedGoodsQtyChanging();
                _countedGoodsQty = value;
                OnCountedGoodsQtyChanged();
            }
        }
        partial void OnCountedGoodsQtyChanging();
        partial void OnCountedGoodsQtyChanged();

        [DataMember]
        public virtual string Remark
        {
            get { return _remark.TrimEnd(); }
            set
            {
                OnRemarkChanging();
                _remark = value;
                OnRemarkChanged();
            }
        }
        partial void OnRemarkChanging();
        partial void OnRemarkChanged();

        [DataMember]
        public virtual string EditFlag
        {
            get { return _editFlag; }
            set 
            {
                _editFlag = value;
            }
        }
        #endregion
    }
}